package com.zhentao.appUser.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhentao.appUser.ApUser;

import java.util.Date;

/**
 * @author 陌寒    Lenovo
 * @date 2025/2/18下午1:38
 * @description 类描述
 */
public class AppUserDto extends ApUser {
    private int pageNum;
    private int pageSize;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date start;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date end;
    public int getFromIndex(){
        if(this.pageNum<1){return 1;}
        if(this.pageSize<1) {this.pageSize = 10;}
        return this.pageSize * (pageNum-1);
    }
}
